package com.hujiang.basic.search.test;

import com.hujiang.basic.framework.core.config.BaseProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.io.ClassPathResource;

import java.nio.charset.StandardCharsets;

/**
 * Created by caolinhua on 2016/12/26.
 */
@Configuration
public class BasePropertiesConfig {

    @Bean
    public BaseProperties properties() {
        BaseProperties baseProperties = new BaseProperties();
        baseProperties.setLocation(new ClassPathResource("application.properties"));
        baseProperties.setFileEncoding(StandardCharsets.UTF_8.name());
        return baseProperties;
    }
}
